/*
 * @Description  : 预览
 * @Author       : zhao
 * @Date         : 2022-07-27 13:34:08
 * @LastEditors  : zhao
 * @LastEditTime : 2022-07-27 15:48:08
 */
import { defineStore } from 'pinia';
import { GetIntroductionLetter, GetAssignment } from "/@/api/borrow.js"
export const usePreview = defineStore('preview', {
    state: () => ({
        previewType: {
            url: "",
            type: "",
            data: ""
        }
    }),
    actions: {
        // 获取介绍信
        getIntroductionLetter(data: any): Promise<any> {
            return new Promise((resolve, reject) => {
                GetIntroductionLetter(data).then((res: any) => {
                    resolve(res)


                })

            })

        },
        // 获取任务书
        getAssignment(data: any): Promise<any> {
            return new Promise((resolve, reject) => {
                GetAssignment(data).then((res: any) => {
                    resolve(res)


                })

            })

        },
    },

});